package com.marchsoft.common.vo;

import com.marchsoft.common.enums.ExceptionEnum;
import com.marchsoft.common.utils.TimeUtils;
import lombok.Data;

import java.util.Date;

/**
 * 返回异常的封装对象
 * @author rsw
 */
@Data
public class ExceptionResult {
    private int status;
    private String message;
    private String errorTime;

    public ExceptionResult(ExceptionEnum em){
        this.status=em.getCode();
        this.message=em.getMsg();
        //获取系统的时间戳信息
//        this.timestamp=System.currentTimeMillis();
        this.errorTime= TimeUtils.getNewTime();
    }
}
